import React, { Component } from 'react'
import {Link,BrowserRouter,Route,NavLink,Switch,Redirect} from 'react-router-dom'
import News from './News/News'
import Msg from './Msg/Msg'

export default class Home extends Component {
  render() {
    return (
      <div>
        <NavLink to="/home/news" style={{marginRight:'20px'}} >news</NavLink>
        <NavLink to="/home/msg" >msg</NavLink>
        <div style={{height:'20px'}}></div>
        <Switch>
          <Route path='/home/news' component={News}></Route>
          <Route path='/home/msg' component={Msg}></Route>
          <Redirect to='/home/msg'></Redirect>
        </Switch>
      </div>
    )
  }
}
